package com.lyx.shopcard.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.lyx.shopcard.entity.UserCustomer;
import com.lyx.shopcard.service.IUserCustomerService;
import com.lyx.shopcard.utils.Result;
import com.lyx.shopcard.vo.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liyanxi
 * @since 2021-07-25
 */
@RestController
@RequestMapping("/user-customer")
public class UserCustomerController {
    @Autowired
    IUserCustomerService iUserCustomerService;

    @GetMapping("/getUserList")
    public Result getUserList (){
        List<UserCustomer> userCustomerList = iUserCustomerService.list();
        return Result.ok(userCustomerList);
    }

//    @PostMapping("/getUserListPage")
//    public Result getUserListPage(@RequestBody PageVO pageVo) {
//        String employeeId = pageVo.getEmployeeId();
//        Integer currentPage = Integer.valueOf(pageVo.getPageNum());
//        Integer pageSize = Integer.valueOf(pageVo.getPageSize());
//        Page<CommentedAnnouncementDto> commentedAnnouncementDtoPage = new Page<CommentedAnnouncementDto>(currentPage, pageSize);
//        IPage<CommentedAnnouncementDto> page = iAnnouncementCommentService.getCommentedAnnouncement(commentedAnnouncementDtoPage, employeeId);
//        System.out.println(page);
//        return Result.ok(page);
//    }

}
